﻿using CommonTools;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Text;
using PropertyChanged;
using FreeSql.DataAnnotations;

namespace shop.Model
{

    /// <summary> 基础资料实体部分类, 实现IFastTree接口 </summary>
    [AddINotifyPropertyChangedInterface]
    public partial class JCustomer : IFastTree
    {
        ///// <summary> 代码 </summary>
        //public string Code => dm;		//todo 不需要的话, 就删除这个

        /// <summary> 在树形图的节点上显示的文字, 一般是代码+空格+名称 </summary>
		[Column(IsIgnore =true)]
        public string NodeText => Code + " " + Name;



		[Column(IsPrimary = true, IsIdentity = true)]
		public int ID { get; set; }


		/// <summary> 代码 </summary>
		[VarChar(20)]
		public string Code { get; set; }


		/// <summary> 名称 </summary>
		[Column(StringLength = 100)]
		public string Name { get; set; } = "";

		/// <summary> 全称 </summary>
		[Column(StringLength = 100)]
		public string FullName { get; set; } = "";

		/// <summary> 供应商简称 </summary>
		[Column(StringLength = 100)]
		public string ShortName { get; set; } = "";


		/// <summary> 税后优惠 </summary>
		[Column(Precision =18,Scale =4)]
		public decimal? AfterTaxDiscount { get; set; } = 0M;

		/// <summary> 年度优惠 </summary>
		[Column(Precision =18,Scale =4)]
		public decimal? AnnualDiscount { get; set; } = 0M;

		/// <summary> 银行 </summary>
		[Column(StringLength = 30)]
		public string Bank { get; set; } = "";

		/// <summary> 银行账号 </summary>
		[Column(StringLength = 30)]
		public string BankAccount { get; set; } = "";

		/// <summary> 手机1 </summary>
		[Column(StringLength = 50)]
		public string Cellphones1 { get; set; } = "";

		/// <summary> 手机2 </summary>
		[Column(StringLength = 50)]
		public string Cellphones2 { get; set; } = "";

		[Column(StringLength = 50)]
		public string Cellphones3 { get; set; } = "";

		/// <summary> 审核人 </summary>
		[Column(StringLength = 50)]
		public string Checker { get; set; } = "";

		/// <summary> 城市 </summary>
		[Column(StringLength = 100)]
		public string City { get; set; } = "";


		/// <summary> 联系人 </summary>
		[Column(StringLength = 50)]
		public string Contact { get; set; } = "";

		/// <summary> 股东优惠 </summary>
		[Column(Precision =18,Scale =4)]
		public decimal? ContractDiscount { get; set; } = 0M;

		/// <summary> 国家 </summary>
		[Column(StringLength = 100)]
		public string Country { get; set; } = "";

		/// <summary> 地址 </summary>
		[Column(StringLength = 100)]
		public string FAddress { get; set; } = "";

		/// <summary> 传真 </summary>
		[Column(StringLength = 50)]
		public string Fax { get; set; } = "";


		/// <summary> 公司主页 </summary>
		[Column(StringLength = 100)]
		public string HomePage { get; set; } = "";

		/// <summary> 发票地址 </summary>
		[Column(StringLength = 100)]
		public string InvoiceAddress { get; set; } = "";


		/// <summary> 座机 </summary>
		[Column(StringLength = 50)]
		public string Phone { get; set; } = "";

		/// <summary> 制单人 </summary>
		[Column(StringLength = 50)]
		public string PreparedBy { get; set; }

		/// <summary> 制单日期 </summary>
		public DateTime? PreparedDate { get; set; }

		/// <summary> 税前优惠 </summary>
		[Column(Precision =18,Scale =4)]
		public decimal? PreTaxDiscount { get; set; } = 0M;

		/// <summary> 业务组 </summary>
		[Column(StringLength = 50)]
		public string ProfessionalGroup { get; set; } = "";

		/// <summary> 省份 </summary>
		[Column(StringLength = 100)]
		public string Province { get; set; } = "";

		/// <summary> 返利标准 </summary>
		[Column(Precision =18,Scale =4)]
		public decimal? RebateStandard { get; set; } = 0M;

		[Column(StringLength = 100)]
		public string Remarks { get; set; } = "";

		/// <summary> 销售周期 </summary>
		public int? SalesCycle { get; set; }

		/// <summary> 业务员 </summary>
		[Column(StringLength = 50)]
		public string SalesRep { get; set; } = "";

		/// <summary> 合同优惠 </summary>
		[Column(Precision =18,Scale =4)]
		public decimal? ShareHolderDiscount { get; set; } = 0M;


		/// <summary> 助记码 </summary>
		[Column(StringLength = 50)]
		public string ShortNumber { get; set; } = "";

		/// <summary> 统一社会信用代码 </summary>
		[VarChar(50)]
		public string UnifiedCreditCode { get; set; } = "";


		/// <summary> 是否关注：0=未关注，1=已关注 </summary>
		public bool? IsAttention { get; set; } = false;

		/// <summary> 是否审核：0=未审核，1=已审核 </summary>
		public bool? IsChecked { get; set; } = false;

		/// <summary> 是否禁用 </summary>
		public bool? Isdel { get; set; } = false;

		/// <summary> 是否明细 </summary>
		public bool? IsDetails { get; set; } = false;


	}

}


